// This object derives from Interact Object and Graphics Object so it can be selectable and drawn
// Might want to move "m_bSelected" to the InteractObject layer though.
// Also might want to move the check collision functions up to that layer and just make them virtual

#ifndef CBUTTON_H_
#define CBUTTON_H_

#include "CInteractObject.h"
#include "CGraphicsObject.h"
#include "..\..\external_libs\SFML\include\SFML\System\Vector2.hpp"
#include "..\..\external_libs\SFML\include\SFML\Graphics\Rect.hpp"


class CButton: public CInteractObject, public CGraphicsObject
{
private:
	char*			m_szText;
	sf::Rect<int>	m_sRect;
	bool			m_bSelected;
	
	


public:
	CButton(void);
	CButton(const char* szText, int posX, int posY, int width, int height);
	~CButton(void);

	CButton(const CButton& obj);
	CButton& operator=(const CButton& obj);

	void draw(sf::RenderTarget& target, sf::RenderStates states) const;

	bool CheckCollision(int posX, int posY);
	bool CheckCollision(sf::Vector2<int> pos);

	void ChangeText(const char* szText);
	void SetSelected(bool bSelected) { m_bSelected = bSelected; }
	bool IsSelected(void) { return m_bSelected; }
	
};

#endif